import uniqueId from '@form-create/utils/lib/unique'
import { localeProps } from '../../utils'

const label = '视频选择器'
const name = 'DkVideoInput'

export default {
  menu: 'high',
  icon: 'icon-park:video-file',
  label,
  name,
  event: ['blur', 'focus', 'change', 'input', 'clear'],
  rule() {
    return {
      type: name,
      field: uniqueId(),
      title: '视频',
      info: '',
      $help: '',
      $required: false,
      props: {}
    }
  },
  props(_, { t }) {
    return localeProps(t, name + '.props', [
      { type: 'input', field: 'placeholder', title: '占位符', value: '请选择文件' },
      { type: 'switch', field: 'showInput', title: '显示输入框', value: true },
      { type: 'inputNumber', field: 'imgSize', title: '图像大小', value: 100 },
      { type: 'input', field: 'accept', title: '文件类型', value: '' }
    ])
  }
}
